// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import MintUI from 'mint-ui'
import ElementUI from 'element-ui';
import axios from 'axios'
import VueAxios from 'vue-axios'
import 'element-ui/lib/theme-chalk/index.css';
import 'mint-ui/lib/style.css';
import mtHeader from '@/components/header/header'
import mtFooter from '@/components/footer/footer'
import preHeader from '@/components/header/preHeader'
import myRadio from '@/components/radio/myRadio'
import noNotice from '@/components/noNotice/noNotice'
import {usertel} from '@/api/index.js'
Vue.component("my-notice",noNotice);
Vue.component("preHeader",preHeader);
Vue.component("my-radio",myRadio);
Vue.component("my-header",mtHeader);
Vue.component("my-footer",mtFooter);
Vue.use(VueAxios, axios)
Vue.use(MintUI);
Vue.use(ElementUI);
Vue.config.productionTip = false

Vue.prototype.usertel = usertel;
Vue.prototype.$axios = axios;
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next()
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
